import { ref } from 'vue';
import { getCategoryAPI } from '@/apis/layout';
import { defineStore } from 'pinia';

export const useCategoryStore = defineStore('category', () => {
  const categoryList = ref([]);
  const getCategory = async () => {
    categoryList.value = (await getCategoryAPI()).result;
  };
  return {
    categoryList,
    getCategory
  };
});
